
// 浏览器本地缓存的方式

// 按需导出
export const setStorage = (key, value) => sessionStorage.setItem(key, value)
export const getStorage = (key) => sessionStorage.getItem(key)
export const removeStorage = (key) => sessionStorage.removeItem(key)
export const clearStorage = () => sessionStorage.clear()

// 默认导出
export default {
  setStorage,
  getStorage,
  removeStorage,
  clearStorage
}

// 外面可以自选使用方式
// 默认导入
// import Obj from '@/storage'
// Object.setStorage('key', 'value')
// 按需导入
// import {setStorage} from '@/storage'
// setStorage('key', 'value')
